export const getDateTime = () => {
  // 本月开始 - 本月结束
  const date = new Date()
  const year = date.getFullYear()
  const month = date.getMonth() + 1
  const day = date.getDate()
  const firstDay = new Date(year, month - 1, 1)
  const firstDayYear = String(firstDay.getFullYear())
  const firstDayMonth = String(firstDay.getMonth() + 1).padStart(2, '0')
  const firstDayDay = String(firstDay.getDate()).padStart(2, '0')

  const lastDay = new Date(year, month, 0)
  const lastDayYear = String(lastDay.getFullYear())
  const lastDayMonth = String(lastDay.getMonth() + 1).padStart(2, '0')
  const lastDayDay = String(lastDay.getDate()).padStart(2, '0')

  const firstDayStr = firstDayYear + '-' + firstDayMonth + '-' + firstDayDay
  const lastDayStr = lastDayYear + '-' + lastDayMonth + '-' + lastDayDay

  return [firstDayStr, lastDayStr]
}
